import time
from func_timeout import func_set_timeout, FunctionTimedOut
import os
@func_set_timeout(3)
def task():
    while True:
        print('hello world')
        input()
        time.sleep(1)

if __name__ == '__main__':
    while True:
        try:
            os.system("clear")
            task()
        except FunctionTimedOut:
            print("hhh")
            time.sleep(5)

